//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//
// (C) Copyright 2006 Marvell International Ltd.
// All Rights Reserved
//
//------------------------------------------------------------------------------
//
//  File: args.h
//
//  This file defines the shared argument structure used by the bootloader and
//  the OS image.
//
#ifndef _ARGS_H_
#define _ARGS_H_

#include "EbootCFG.h"
#include "oal_args.h"
#include "oal_args_kitl.h"
//------------------------------------------------------------------------------

#define BSP_ARGS_VERSION    10

#define BSP_ARGS_QUERY_DBGSERIAL        BSP_ARGS_QUERY      // Query debug serial port.
#define BSP_ARGS_QUERY_FORMATPARTITION  BSP_ARGS_QUERY+1
#define BSP_ARGS_QUERY_L2CACHE			BSP_ARGS_QUERY+2

#define BSP_ARGS_USB_CLIENT_1_1  0
#define BSP_ARGS_USB_CLIENT_2_0  1

#define BSP_ARGS_OV7670  0
#define BSP_ARGS_OV5623  1

#define BSP_ARGS_BLIT_GCU 0
#define BSP_ARGS_BLIT_OPT 1
#define BSP_ARGS_BLIT_EMU 2

#define BSP_ARGS_RUN_FREQ_IPM	0x0
#define BSP_ARGS_RUN_FREQ_1     0x1
#define BSP_ARGS_RUN_FREQ_2     0x2
#define BSP_ARGS_RUN_FREQ_3     0x3
#define BSP_ARGS_RUN_FREQ_4     0x4
#define BSP_ARGS_RUN_FREQ_5     0x5
#define BSP_ARGS_RUN_FREQ_6     0x6

#define BSP_ARGS_RUN_FREQ_MAX   0x7

#define BSP_ARGS_RUN_FREQ_IPM_DESC	"IPM enable"
#define BSP_ARGS_RUN_FREQ_1_DESC	"Ring Oscillator Mode(Some device will not work)"
#define BSP_ARGS_RUN_FREQ_2_DESC	"104 Mhz"
#define BSP_ARGS_RUN_FREQ_3_DESC	"208 Mhz"
#define BSP_ARGS_RUN_FREQ_4_DESC	"416 Mhz Turbo"
#define BSP_ARGS_RUN_FREQ_5_DESC	"624 Mhz Turbo"
#define BSP_ARGS_RUN_FREQ_6_DESC	"806 Mhz Turbo"

#define BSP_ARGS_WM9713_TOUCH  0
#define BSP_ARGS_TSI_TOUCH  1

#define BSP_ARGS_IDLE_D0CS  0x1
#define BSP_ARGS_IDLE_D1    0x2
#define BSP_ARGS_IDLE_D2	0x4

#define BSP_ARGS_STUART_DEBUG_SERIAL  0x1
#define BSP_ARGS_STUART_IRDAL  0x2

//bit 0: 1-Bebug Serial, 0-others
//bit 1: 1-ActiveSync, 0-others
//bit 2: 1-RIL, 0-others
//bit 4: 1-DMA, 0-PIO
#define BSP_ARGS_FFUART_DEBUG_SERIAL  0x1
#define BSP_ARGS_FFUART_ACTIVESYNC      0x2
#define BSP_ARGS_FFUART_RIL                     0x4
#define BSP_ARGS_FFUART_DMA                   0x10
#define BSP_ARGS_FFUART_1     (BSP_ARGS_FFUART_DEBUG_SERIAL)
#define BSP_ARGS_FFUART_2     (BSP_ARGS_FFUART_RIL)


//bit 0: 1-None
//bit 1: 1-Only Enable Bluetooth
//bit 2: 1-Only Enalbe WiFi
//bit 4: 1-Both Enable
#define BSP_ARGS_TECHBOARD_NONE        0x0
#define BSP_ARGS_TECHBOARD_BT          0x1
#define BSP_ARGS_TECHBOARD_WLAN        0x2
#define BSP_ARGS_TECHBOARD_BT_WLAN     0x3
#define BSP_ARGS_TECHBOARD_BASEBAND	   0x4


typedef struct {
    OAL_ARGS_HEADER header;
    UINT32	argsLength;

    UINT8 deviceId[16];                 // Device identification
    OAL_KITL_ARGS kitl;
    UINT32 dbgSerPhysAddr;              // Debug serial physical address
    DWORD ARSR;                         // Reset cause

    DWORD DefaultSensor;				// Default sensor
    DWORD RunFreq;						// CPU Frequence
    DWORD OALDebugZone;					// OAL DebugZone


    BOOL bUpdateMode;
    BOOL bFormatPartition;              // Format userpartition
    BOOL L2CacheEnable;
    BOOL IMM_ENABLE;
    EBOOT_CFG eBootCFG;
    DWORD DefaultTouchDriver;		// Default TOUCH SCREEN DRIVER
    DWORD LowPowerModeIdle;			// LOW POWER MODE IDLE
    BOOL BatteryEnable;				// is a Battery attached
    DWORD STUARTUsage;				// STUART usage mode  
    DWORD FFUARTUsage;				// FFUART usage mode
    DWORD TechBoardUsage;		        // Technology Board
    BOOL NAND_DMA_enable;                       //NAND configurations in OS: DMA        
    BOOL NAND_INTR_enable;                      //NAND configurations in OS: interrupt
    BOOL NAND_ClockGatingWA_enable;     //NAND configurations in OS: clock gating workaround
    DWORD DefaultBlit;				// Default bit blit function
    BOOL SpecialECO;				// For Golden Board
} BSP_ARGS, *PBSP_ARGS;

#endif // _ARGS_H_.
